home *** CD-ROM | disk | FTP | other *** search
- /*
- File: Sample.h
-
- Contains: Location Manager SDK Sample Module Rez/C includes
-
- Version: ALM SDK 1.0
- Package: Location Manager SDK 1.0
-
- Copyright: © 1984-1997 by Apple Computer, Inc.
- All rights reserved.
-
- Bugs?: If you find a problem with this file, use the Apple Bug Reporter
- stack. Include the file and version information (from above)
- in the problem description and send to:
- Internet: apple.bugs@apple.com
-
- */
-
- #ifndef __SAMPLE__
- #define __SAMPLE__
-
- // --------------------------------------------------------------------------------------
-
- #ifdef REZ
-
- #ifndef __SYSTYPES_R__
- #include "SysTypes.r"
- #endif // __SYSTYPES_R__
-
- #ifndef __TYPES_R__
- #include "Types.r"
- #endif // __TYPES_R__
-
- #else
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif // __TYPES__
-
- #endif // REZ
-
- // --------------------------------------------------------------------------------------
-
- // Errors...
-
- #define kSampleErrStrRsrcID 10000
- #define kSampleImportPrefDatesIdx 1
- #define kSampleCouldNotQuitIdx 2
- #define kSampleBiggestKnownIdx kSampleCouldNotQuitIdx
-
- // Other text...
-
- #define kSampleMiscStrRsrcID 10001
- #define kSampleDescribeTemplateIdx 1
-
- // Constants for common use...
-
- #define kAppListNeverQuit 0x00
- #define kAppListQuitOnSet 0x80
- #define kAppListQuitOnGet 0x40
- #define kAppListQuitOnGetOrSet 0xC0
-
- #define kNoRestart 0x00
- #define kRestartIfChanged 0x80
-
- #define kExecutableRsrcType 'code'
- #define kExecutableRsrcID 10000
-
- #define kNameRsrcType 'STR '
- #define kNameRsrcID 10000
-
- #define kDescRsrcType 'STR '
- #define kDescRsrcID 10001
-
- #define kIconRsrcType 'ICON'
- #define kIconRsrcID 10000
-
- #define kINTLrsrcType 'intl'
- #define kINTLrsrcTypeString "intl"
- #define kINTLrsrcID 10000
-
- #define kAppsRsrcType 'apps'
- #define kAppsRsrcTypeString "apps"
- #define kAppsRsrcID 10000
-
- #define kFilesRsrcType 'fils'
- #define kFilesRsrcTypeString "fils"
- #define kFilesRsrcStartID 10000
-
- #define kRestartRsrcType 'rstr'
- #define kRestartRsrcTypeString "rstr"
- #define kRestartRsrcStartID 10000
-
- #define kGetInfoRsrcID 10000
-
- // --------------------------------------------------------------------------------------
-
- // A bunch of structures we keep in resources; do the rez versions first, then the C
- // versions...
-
- #ifdef REZ
-
- // Internationalization in an easy place for internationalizers to get at it...
-
- type kINTLrsrcType {
- integer kALMScriptInfoVersion = 2;
- integer Script;
- integer Region;
- integer Language;
- integer; // fontSize
- pstring; // fontName;
- };
-
- type 'TMPL' {
- wide array Fields {
- pstring; // field name
- string[4]; // field type
- };
- };
-
- type kAppsRsrcType {
- integer = $$CountOf (AppArray);
- array AppArray {
- string[4]; // Application to quit
- unsigned hex byte
- neverQuit = kAppListNeverQuit,
- quitOnSet = kAppListQuitOnSet,
- quitOnGet = kAppListQuitOnGet,
- quitOnGetOrSet = kAppListQuitOnGetOrSet;
- align word;
- };
- };
-
- type kFilesRsrcType as 'STR ';
-
- type kRestartRsrcType {
- unsigned hex byte
- dontRestart = kNoRestart,
- doRestart = kRestartIfChanged;
- align word;
- };
-
- #else
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=mac68k
- #endif // PRAGMA_ALIGN_SUPPORTED
-
- typedef struct {
- SInt16 version;
- SInt16 scriptCode;
- SInt16 regionCode;
- SInt16 langCode;
- SInt16 fontSize;
- Str63 fontName;
- } INTLinfoRec, *INTLinfoPtr, **INTLinfoHandle;
-
- // (Do not require an analog for 'TMPL')
-
- typedef struct {
- OSType applicationCode;
- UInt8 flags;
- UInt8 filler1;
- } ApplicationEntry;
-
- typedef struct {
- SInt16 applicationCount;
- ApplicationEntry applications[kVariableLengthArray];
- } ApplicationListRec, *ApplicationListPtr, **ApplicationListHandle;
-
- typedef struct {
- Str255 fileName;
- } FileEntryRec, *FileEntryPtr, **FileEntryHandle;
-
- typedef struct {
- UInt8 flags;
- UInt8 filler1;
- } FileFlagsRec, *FileFlagsPtr, **FileFlagsHandle;
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=reset
- #endif // PRAGMA_ALIGN_SUPPORTED
-
- #endif // REZ
-
- // --------------------------------------------------------------------------------------
-
- #endif // __SAMPLE__
-